#!/bin/sh

currentUser=`env | grep USER | cut -d "=" -f 2`
if [ "$currentUser" != "root"  ];then
    echo "当前用户不是root"
    exit "1"
fi

cd /www/go/src/blog
git pull 
go build -o bin/blogServer.exe cmd/http/main.go
supervisorctl status
supervisorctl restart blog_go
supervisorctl status

